﻿@model IEnumerable<GSLMS.Entity.TB_ADU_REFREGASS>
@{
    Layout = null;
    int i = 1;
    var SearchParma = ViewData["SearchParma"] as GSLMS.Entity.TB_ADU_REFREGASS ?? new GSLMS.Entity.TB_ADU_REFREGASS();
    var ddlSalesMan = ViewData["SalesMan"] as SelectList;

    //SearchParma.ASSDATE = DateTime.Now.AddMonths(-1);
    //SearchParma.ASSDATE_END = DateTime.Now;
    ViewData["reSearchDiv"] = "divHRefRegInfo";   
}
<div id="divHRefRegInfo">
    <form id="pagerForm" method="get" action="DianDang/BMAudit/bManager/HRefRegInfo?action=page&OpID=@ViewData["OperateID"]">
    <input type="hidden" name="pageNum" value="1" />
    <input type="hidden" name="numPerPage" value="@ViewData["pageSize"]" />
    <input type="hidden" name="RowCount" value="@ViewData["RowCount"]" />
    <input type="hidden" name="CUSTNAME" value="@SearchParma.CUSTNAME" />
    <input type="hidden" name="CUSTNO"" value="@SearchParma.CUSTNO" />
    <input type="hidden" name="SALESMANID"" value="@SearchParma.SALESMANID" />
    <input type="hidden" name="ASSDATE" value="@SearchParma.ASSDATE" />
    <input type="hidden" name="ASSDATE_END" value="@SearchParma.ASSDATE_END" />
    </form>
    <div class="pageHeader">
        <form onsubmit='return divSearch(this,"divHRefRegInfo")' id="Form_@ViewData["CurrentController"]" action="DianDang/BMAudit/bManager/HRefRegInfo?action=search&OpID=@ViewData["OperateID"]"
    method="post">
        <div class="searchBar">
            <table class="searchContent">
                <tr>
                    <th>
                        客户名称：
                    </th>
                    <td>
                        @Html.TextBox("CUSTNAME", SearchParma.CUSTNAME, new {@style="width:100px" })
                    </td>
                    <th>
                        证件号码：
                    </th>
                    <td>
                        @Html.TextBox("CUSTNO", SearchParma.CUSTNO, new { @style = "width:100px" })
                    </td>
                    <th>
                        分配时间：
                    </th>
                    <th>
                        @Html.TextBox("APPDATE", SearchParma.ASSDATE, new { @class = "date", @style = "width:70px", format = "yyyy-MM-dd", @maxDate = "%y-%M-%d", @readonly = "true", formatDate = "yyyy-MM-dd" })
                    </th>
                    <th>
                        ~
                        @Html.TextBox("APPDATE_END", SearchParma.ASSDATE_END, new { @class = "date", @style = "width:70px", format = "yyyy-MM-dd", @maxDate = "%y-%M-%d", @readonly = "true", formatDate = "yyyy-MM-dd" })
                    </th>
                    <th>
                        &nbsp;&nbsp;跟进业务员:
                    </th>
                    <td>
                        @Html.DropDownList("SalesManID", ddlSalesMan, GSLMS.WebAPP.HelperCommon.SelectDefaultValue, new {  @style = "width:80px"})
                    </td>
                    <td align="right">
                        <div class="subBar">
                            <ul>
                                <li>
                                    <div class="buttonActive">
                                        <div class="buttonContent">
                                            <button type="submit" name="submit">
                                                检索</button></div>
                                    </div>
                                </li>
                                <li>
                                    <div class="buttonActive">
                                        <div class="buttonContent">
                                            <button type="reset" name="reset">
                                                重置</button></div>
                                    </div>
                                </li>
                            </ul>
                        </div>
                    </td>
                </tr>
            </table>
        </div>
        </form>
    </div>
    <div class="pageContent">
        <table class="list" layouth="360">
            <thead>
                <tr class="header">
                    <th style="width:135px;">
                        客户名称
                    </th>
                    <th style="width:100px;">
                        证件号码
                    </th>
                    <th style="width:120px;">
                        分配跟进业务员
                    </th>
                    <th style="width:80px;">
                        分配时间
                    </th>
                    <th style="width:60px;">
                        操作
                    </th>
                </tr>
            </thead>
            @foreach (var item in Model)
            {            
                <tr>
                    <td>
                        @item.CUSTNAME
                    </td>
                    <td>
                         @item.CUSTNO
                    </td>
                    <td style="text-align:center;">
                        @item.SALESMAN
                    </td>
                    <td style="text-align:center;">
                        @(item.ASSDATE == null ? "" : (item.ASSDATE.Value.ToString("yyyy-MM-dd HH:mm:ss")))
                    </td>
                    <td style="text-align:center;">
                        <a href='DianDang/Apply/RefRegInfo/Details/@item.REFREGID?OpID=@ViewData["OperateID"]' target="dialog" rel="divQueryPro">
                            查看</a>
                    </td>
                </tr>
                i += 1;
            }
        </table>
    </div>
     @Html.Partial("PageBar")
</div>
